import {
  HIDE_LOADING,
  SHOW_LOADING,
  SET_SETADDRESS
} from './type'

const state = {
  loading: false,
  setAddress:{}
};

const mutations = {
  /*loading*/
  [HIDE_LOADING](state) {
    state.loading = false;
  },
  [SHOW_LOADING](state) {
    state.loading = true;
  },
  [SET_SETADDRESS](state,setAddress){
    state.setAddress = setAddress;
  }
};

const getters = {
  loading(state) {
    return state.loading;
  },
  setAddress(state){
    return state.setAddress;
  }
};

export default {
  state,
  mutations,
  getters
}
